<?php
class Block_MenuLeft extends Zend_View_Helper_Abstract{
	public function menuLeft(){
		$view = $this->view;
		$arrParam = $this->arrParam;
		
		$db = Zend_Registry::get('connectDb');
		$select = $db->select()
					->from('c2i_menu_cat', array('id','name','groupcode','link'))
					->where('publish=1 and is_system=1')
					->order('ordering ASC');
					
		$results = $db->fetchAll($select);
		
		$items = $this->createMenu($results,$view);
		
		require_once(BLOCK_PATH . '/menu-left/left-menu.php');
	}
	
	public function createMenu($sources){
		$text ='';
		if(count($soures)>0){
			foreach ($sources as $key => $value) {
				$text = $text . '<li class="item53 parent">'
					. '<a href="' . $value['link'] . '" class="orphan item bullet"><span>' . $value['name'] . '</span></a>'
					. '';
			}
		}
		return $text;
	}
	
	public function createChildMenu($sources,$groupcode){
		
	}
}
?>